package com.pand.model.tool;

import com.pand.model.BaseObject;

import javax.persistence.*;
import java.util.Date;

/**
 * 
 * @ClassName: NumberGenerator 
 * @Description: 
 *
 */
@Entity
@Table(name = "RES_CUR_NO")
@SequenceGenerator(name="CurNoSEQ", sequenceName="SEQ_RES_CUR_NO",allocationSize=1)
public class NumberGenerator extends BaseObject{
	
	/** 
	 * @Fields serialVersionUID : 、
	 */ 
	private static final long serialVersionUID = 1L;
	/*****
	 * 下列不能包含“.”
	 */
	public static final String ORDER_NO="OrderNo";
	public static final String LRINTENTION_NO="LrIntentionNo";
	public static final String CONTRACT_NO="ContractNo";
	public static final String SETTLE_NO="SettleNo";
	public static final String CUSTOMER_PAYMENT_NO="CustomerPaymentNo";
	public static final String THIRDPARTY_PAYMENT_NO="ThirdPartyPaymentNo";
	public static final String ACCOUNT_JOURNAL_NO="AccountJournalNo";
	public static final String NEW_PHONE_CHECKCODE="NewPhoneCheckcode";
	public static final String COUPON_BATCH_INFO="CouponBatchInfo";
	public static final String PID="Pid";

	/**
	 * 主键
	 */
	private Long id;
	
	/**
	 * key
	 */
	private String keyId;
	
	/**
	 * 标示
	 */
	private String prefix;
	
	/**
	 * 当前数量
	 */
	private Integer nextId;
	
	/**
	 * 时间
	 */
	private Date genTime;
	@Id
	@GeneratedValue(generator="CurNoSEQ")
	@Column(name = "ID")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Column(name = "KEY_ID")
	public String getKeyId() {
		return keyId;
	}
	public void setKeyId(String keyId) {
		this.keyId = keyId;
	}
	@Column(name = "prefix")
	public String getPrefix() {
		return prefix;
	}
	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}
	@Column(name = "NEXT_ID")
	public Integer getNextId() {
		return nextId;
	}
	public void setNextId(Integer nextId) {
		this.nextId = nextId;
	}
	@Column(name = "GEN_TIME")
	public Date getGenTime() {
		return genTime;
	}
	public void setGenTime(Date genTime) {
		this.genTime = genTime;
	}
	
}

